package com.itheima.mapper1;

import com.itheima.pojo.Dish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


import javax.print.DocFlavor;
import java.util.List;

/**
 * @author wuyiqiang
 * @2022/6/18 15:54
 */
@Mapper
public interface DishClientMapper {

    /**
     * 根据菜品分类id查看菜品信息
     * @param categoryId
     * @param status
     * @return
     */
    @Select("select * from dish where category_id=#{categoryId} and status=#{status}")
    List<Dish> findByCategoryId(String categoryId,Integer status);

    /**
     * 根据id查询菜品信息
     * @param id
     * @return
     */
    @Select(("select * from dish where id=#{id}"))
    Dish findById(String id);

}
